function skip(){
    var oSelect = document.getElementsByTagName("select")[0];
    var aOption = oSelect.getElementsByTagName("option");
    // console.log(aOption[1])
    oSelect.onchange = function(){
        // console.log(oSelect.options[oSelect.selectedIndex].value)
        for (let index = 0; index <aOption.length; index++){
            let el = aOption[index];
            // console.log(el.value)
            if(el.selected){
                // console.log(el.value)
                localStorage.setItem("selected",el.value);
                localStorage.setItem("selectedIndex",index);
            }   
        };
        skipShow()
    }   
   
}
function setLocation(){
    
}
function skipShow(){
    var oSelect = document.getElementsByTagName("select")[0];
    var aOption = oSelect.getElementsByTagName("option");
    var link = document.getElementById("skipWeb");
    // console.log(link.parentNode)
    var srcSkip = localStorage.getItem("selected");
    // console.log(srcSkip)
    var selectedIndex = localStorage.getItem("selectedIndex");
    // console.log(srcSkip)
    //dom上创建
    var selectedOption = document.createAttribute("selected");
    // console.log(selectedOption);
    //连接属性给option
    aOption[selectedIndex].setAttributeNode(selectedOption);
    // console.log( aOption[selectedIndex]);
    link.setAttribute("href","./css/"+srcSkip+".css")
}

skip()
skipShow()